#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define LEN 20
int main(int argc, char *argv[])
{
	FILE *sor, *dst;
	char temp[LEN];
	if(argc != 3)
	{
		fprintf(stderr, "input wrong\n");
		exit(EXIT_FAILURE);
	}
	if((sor = fopen(argv[1], "wb")) == NULL)
	{
		fprintf(stderr, "can not open the file\n");
		exit(EXIT_FAILURE);
	}	
	if((dst = fopen(argv[2], "rb")) == NULL)
	{
		fprintf(stderr, "can not open the file\n");
		exit(EXIT_FAILURE);
	}
	fread(temp, sizeof(char), LEN, dst);
	fwrite(temp, sizeof(char), LEN, sor);
	if(fclose(sor) != 0 || fclose(dst) != 0)
		fprintf(stderr, "close file failed\n");
	puts("DONE!");
	return 0;	
}
